#include "LoggerMain.h"

namespace re
{
	namespace core
	{
		void LoggerProcess::Update()
		{
			EventDataPtr data;
			listener_->queue_.wait_pop(data);
			//handle data
			std::wstring strdata;
#ifdef RE_ENABLE_LOGGING_CONSOLE | RE_ENABLE_LOGGING_LOGFILE
			data->VGetEventDataAsString(strdata);
#endif
#ifdef RE_ENABLE_LOGGING_CONSOLE
			std::wcout << strdata << std::endl;
#endif
#ifdef RE_ENABLE_LOGGING_LOGFILE

#endif
		}
		void LoggerProcess::Initialize()
		{
			listener_ = new core::RealtimeEventListener;
			listener_holder_ = core::EventListenerPtr(listener_);
			core::IEventManager::GetGlobal()->VRegisterListener(listener_holder_);
		}
		void LoggerProcess::ShutDown()
		{
		}
	}
}